package com.hyj.ecp.common.constant;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.apache.log4j.Logger;

/**
 * @version
 * @author huyj
 * add on 2013/06/03
 *  静态参数
 */
public class SysConstant {
	static Logger logger = Logger.getLogger(SysConstant.class); 
	
	public static String ENCODE = "UTF-8";
	
	public static String ContentType="text/html;charset=UTF-8";
	
	public static String Header_Accept ="application/json";
	
	public static int NULL_ID = 0; //JSP选择框  ID为空的值
	
	public static String SAVE_SUCCESS_STR  ="保存成功！";
	
	public static String SAVE_FAIL_STR  ="保存失败！";
	
	public static String UPDATE_SUCCESS_STR  ="修改成功！";
	
	public static String UPDATE_FAIL_STR  ="修改失败！";
	
	public static String DELETE_SUCCESS_STR  ="删除成功！";
	
	public static String DELETE_FAIL_STR  ="删除失败！";
	
	public static String NOT_LOGIN  ="未登入，或者长时间未操作！";
	
	public static String ORDER_DDFK = "00"; //等待付款
	public static String ORDER_DDSH = "00"; // 等待收货
	public static String ORDER_YWC = "00";  // 已经完成
	public static String ORDER_QX = "00";   // 取消
	
	
	private static Properties p ;
	static {
	
	    p = new Properties();
		try {
			p.load(SysConstant.class.getResourceAsStream("/system.properties"));
			logger.info("加载配置文件/system.properties");
		} catch (IOException e) {
			logger.error("加载配置文件/system.properties 出错",e);
		}
		
	}
	
	
	public static String getPropertiy(String name){
		  
		  return p.getProperty(name);
	}
  
}